home *** CD-ROM | disk | FTP | other *** search
-
- Benchmarking Atari ST Personal Pascal (OSS, Inc.)
- versus IBM PC AT Turbo Pascal (Borland International)
-
-
-
- As soon as I purchased Personal Pascal (V1.01) for my 1040 ST, I ran
- some simple benchmarks on it against our IBM PC AT at my office.
- Our AT is equipped with a speed-switcher to increase the clock rate
- from the normal 6 MHz to 8MHz. Since this is a fairly common item,
- and because newer ATs are set up to run at 8 MHz, I included these
- times in the test as well.
-
- All tests on the PC AT were run in Borland Turbo Pascal (Version 3.01),
- the de facto standard for MS-DOS Pascal. Because Turbo Pascal defaults
- are for range, pointer, and debugging checking turned off, they were turned
- off for the Personal Pascal versions as well. Times on the AT were
- measured using the hardware timers; I used a handheld stopwatch for the
- ST, but hopefully they are fairly accurate. All tests on the ST were
- compiled for TOS.
-
- The Sieve benchmark is the standard test which everybody seems to run
- on all machines, and it primarily tests integer math operations (actually
- only integer addition). The fibonacci benchmark tests the recursion code
- efficiency of the compiler. The float benchmark is a test of the efficiency
- of the simple floating point operations (+,-,*,/) directly supported
- by the CPU. The trig/transcendental benchmark measures the efficiency
- of some of the trigonometric and transcendental library functions
- supported by the compiler.
-
- I don't claim that these benchmarks are especially definitive, but
- they do seem to prove that the Atari ST is extremely competitive with
- the IBM PC AT in terms of a Pascal programming environment, particularly
- for scientific/engineering applications involving floating point math.
- The code for each of the tests follows the table summary.
-
- -- Kirk Pennywitt [74116,3222] --
-
-
-
-
- PASCAL BENCHMARK SUMMARY
- ========================
-
- ATARI ST PC AT (6 MHz) PC AT (8 MHz)
- ---------------------------------------------------------
- Sieve 6.1 sec. 5.38 sec. 3.95 sec.
- Fibonacci 23.6 sec. 23.67 sec. 17.36 sec.
- Floating Point 10.1 sec. 14.56 sec. 10.71 sec.
- Trig/Transc. 14.1 sec. 16.31 sec. 11.98 sec.
-
- Atari ST OSS Personal Pascal (V1.01) versus
- IBM PC AT Borland Turbo Pascal (V3.01).
-
-
- -------------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
- {$R-,D-,P-}
-
- (* Erastosthenes Sieve Prime Number Program *)
- (* Tests integer math *)
-
- program prime;
- const
- size = 8190;
- var
- flags : array [0..size] of boolean;
- i,prime,k,count,iter : integer;
- begin
- writeln('10 iterations');
- for iter := 1 to 10 do begin
- count := 0;
- for i := 0 to size do
- flags[i] := true;
- for i := 0 to size do
- if flags[i] then begin
- prime := i+i+3;
- {writeln(prime);}
- k := i+prime;
- while k <= size do begin
- flags[k] := false;
- k := k + prime
- end;
- count := count + 1
- end;
- end;
- writeln(count,' primes.')
- end.
-
- { Runs in approx 6.1 sec. on Atari ST (Personal Pascal). }
- { Runs in 5.38 sec. on IBM PC AT @ 6 MHz. (Turbo Pascal). }
- { Runs in 3.95 sec. on IBM PC AT @ 8 MHz. (Turbo Pascal). }
-
- -------------------------------------------------------------------------------
-
- {$R-,D-,P-}
-
- program fibo; { Tests recursion }
- const
- ntimes = 10;
- number = 23;
- var
- i, value : integer;
- function fibo(x : integer) : integer;
- begin
- if x>2 then fibo := (fibo(x-1) + fibo(x-2))
- else fibo := 1;
- end; { of function fibo }
- begin
- writeln(ntimes,' iterations.');
- for i := 1 to ntimes do value := fibo(number);
- writeln('fibonacci(',number,') = ',value);
- end.
-
- { Runs in approx. 23.6 sec on Atari ST (Personal Pascal). }
- { Runs in 23.67 sec. on IBM PC AT @ 6 Mhz. (Turbo Pascal). }
- { Runs in 17.36 sec. on IBM PC AT @ 8 MHz. (Turbo Pascal). }
-
- -------------------------------------------------------------------------------
-
-
-
-
- {$D-,R-,P-}
-
- program float; { Tests floating point operations }
- var
- a, b, c : real;
- i : integer;
- begin
- writeln('10000 iterations.');
- a := 3.1415926;
- b := 5.1234548;
-
- for i := 1 to 10000 do begin
- c := a * b;
- b := a / c;
- a := b + c;
- c := a - b;
- end;
- writeln('Done.');
- end.
-
- { Runs in approx. 10.1 sec. on Atari ST (Personal Pascal). }
- { Runs in 14.56 sec. on IBM PC AT @ 6 MHz. (Turbo Pascal). }
- { Runs in 10.71 sec. on IBM PC AT @ 8 MHz. (Turbo Pascal). }
-
- -------------------------------------------------------------------------------
-
- {$D-,R-,P-}
-
- program trig_trans; { Tests trig and transcendental libraries}
- var
- a, b, c : real;
- i : integer;
- begin
- writeln('1000 iterations.');
- a := 3.1415926;
- b := 5.1234548;
-
- for i := 1 to 1000 do begin
- c := ln(a);
- c := exp(b);
- c := sin(a);
- c := cos(b);
- end;
- writeln('Done.');
- end.
-
- { Runs in approx. 14.1 sec. on Atari ST (Personal Pascal). }
- { Runs in 16.31 sec. on IBM PC AT @ 6 MHz. (Turbo Pascal). }
- { Runs in 11.98 sec. on IBM PC AT @ 8 MHz. (Turbo Pascal). }
-